<?php
/**
* @version		$Id: sliderelements.php r5 2010-10-24 imranweb7 $
* @copyright	Copyright (C) 2010 imranweb7.com. All rights reserved.
* @license		GNU/GPL
* @Author:      Muhammed Imran Hussain
* @Websites:    http://www.imranweb7.com

* mod_slg_vm_productslider! is a free Joomla+Virtuemart module.
* This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
*/

class JElementSliderElements extends JElement {
	
	var    $_name = 'SliderElements';

	function fetchElement($name, $value, &$node, $control_name){
		require_once (JPATH_SITE . '/modules/mod_slg_vm_productslider/helper.php');
		$categories = ModSliderHelper::getVmCategoryNameByHasProduct();
		
		foreach ($categories as $s){
			$cat[] = JHTML::_('select.option', $s->category_id, '=> '.stripslashes($s->category_name));
		}
		
		$lists['categories']	= JHTML::_('select.genericlist', $cat, $control_name."[categories][]", 'class="inputbox" size="12"  style="font-weight: bold; height:160px; width:100%; overflow:scroll;"  multiple="multiple"', 'value', 'text',$this->_parent->get('categories'));


    	return  $lists['categories'];

  	}
}